import { Type } from 'class-transformer'
import { IsNotEmpty, IsNumber, IsOptional } from 'class-validator'
import i18n from '@/i18n'
import { ApiProperty } from '@nestjs/swagger'

export class PageDto {
  @ApiProperty({ description: i18n.t('lhy-core.dto.page.1215068-0') })
  @Type(() => Number)
  @IsNotEmpty()
  @IsNumber()
  current: number = 1

  @ApiProperty({ description: i18n.t('lhy-core.dto.page.1215068-1') })
  @Type(() => Number)
  @IsNumber()
  @IsOptional()
  size?: number = 20
}
